#include <iostream>
using namespace std;
int main()
{
	int i = 0, j = 0, errorSum = 0;
	int score = 0;
	int error[20];
	char answer[20] = {'B','A','B','C','D','B','C','C','A','A','D','B','A','C','A','D','C','D','D','A'};
	char studentAnswer[20];
	
	for( i = 0; i < 20; i++)
	{
		cin>>studentAnswer[i];
		while( studentAnswer[i] != 'A'&&studentAnswer[i] != 'B'&&studentAnswer[i] != 'C'&&studentAnswer[i] != 'D')
		{
			cout<<"不存在该答案，请重新输入："<<endl;
			cin>>studentAnswer[i];
		}
	}
	
	for( i = 0; i < 20; i++)
	{
		if(studentAnswer[i] == answer[i])
		score += 1;
		else
		{
			errorSum += 1;
			error[j] = i + 1;
			j++;
		}
	}
	
	if( score >= 12)
		cout<<"该学生通过考试"<<endl;
	else
	{
		cout<<"该学生未通过考试"<<endl;
		cout<<"错误题数："<<errorSum<<endl;
		cout<<"错误题号：";
		for( j = 0; j < errorSum - 1; j++)
		cout<<error[j]<<',';
		cout<<error[errorSum - 1]<<endl;
	}
	
	return 0;
}